package ee.videorentalstore.protocols.commands.filmmanagercommands;

import ee.videorentalstore.inventories.Film;
import ee.videorentalstore.inventories.FilmInventory;
import ee.videorentalstore.protocols.commands.Command;

public class GetListOfAllFilmsCommand extends Command
{
	@Override
	public String getCommandDescription() 
	{
		return "GET LIST OF ALL FILMS";
	}
	
	
	@Override
	public void executeCommand(String inputStreamToProcess)
	{
		for (Film filmInInventory : FilmInventory.getInstance().getAllFilmsInInventory())
		{
			System.out.println("Film ID: " + filmInInventory.getFilmID() + "\n" +
							   "Film name: " + filmInInventory.getName() + "\n" +
							   "Film type: " + filmInInventory.getType().toString());
			System.out.println();
		}
	}
}
